package 笔试强训;

import java.util.*;

public class 删除公共字符 {
    public static void main(String[] args) {
        Scanner scanner1 = new Scanner(System.in);
        String string = scanner1.nextLine();
        char[] charArray1 = string.toCharArray();
        List<Character> list = new LinkedList<>();
        for (int i = 0;i < charArray1.length; i++){
            list.add(charArray1[i]);
        }
        Scanner scanner2 = new Scanner(System.in);
        String string2 = scanner2.next();
        char[] charArray2 = string2.toCharArray();
        Set<Character> set = new HashSet<>();
        for (int i = 0;i<charArray2.length;i++){
            set.add(charArray2[i]);
        }
        for (int i = 0;i < list.size();i++){
            if (set.contains(list.get(i))) list.remove(i);
        }
        for (int i = 0;i<list.size();i++){
            System.out.print(list.get(i));
        }
    }
}
